//
//  GoodsCellTableViewCell.m
//  FKGW
//
//  Created by song ce on 2017/2/21.
//  Copyright © 2017年 song ce. All rights reserved.
//

#import "GoodsCellTableViewCell.h"
#import "OSSHelper.h"
@implementation GoodsCellTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.selectionStyle =UITableViewCellSelectionStyleNone;
    self.userIconImageV.layer.cornerRadius = self.userIconImageV.frame.size.height/2;
    self.userIconImageV.layer.masksToBounds = YES;
}


-(void)setModel:(EvaluateListModel *)model{
    _model   =   model;
    NSString *objectKey = _model.usericon;
    [[OSSHelper sharedHelper] OSSDownLoadWithObjectKey:objectKey xOssProcess:@"image/resize,m_fill,w_25,h_25"  downLoadBlock:^(NSData *data) {
        //回主线程
        dispatch_async(dispatch_get_main_queue(), ^{
            //设置评论列表用户头像
            self.userIconImageV.image= [UIImage imageWithData:data];
        });
    }];
    self.userNameLabel.text = _model.username;
    self.contentLabel.text = _model.content;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
